use toy_brick::Picture;

fn main() {
    let picture = Picture::from_tga("test.tga").unwrap();
    println!("len: {}", picture.pixels().len());

    let greens = picture.pixels()
        .iter()
        .enumerate()
        .filter(|(i, c)| [106, 190, 48].contains(c));

    let reds = picture.pixels().iter()
        .enumerate()
        .filter(|(i, c)| [172, 50, 50].contains(c));

    println!("Green pixels:");
    for c in greens {
        println!("({}, {})", c.0, c.1);
    }

    println!("Red pixels");
    for c in reds {
        println!("({}, {})", c.0, c.1);
    }
}